/**
 * 我的信息
 */

import { HttpError, toFail, toSuccess } from "@sker/core";
import { useCurrentUser } from "@sker/runtime"

export default async () => {
    const [currentUser, setCurrentUser] = useCurrentUser(true);
    const { id, uid, username } = currentUser;
    return toSuccess({
        id, uid, username
    })
}